package com.maoslv.service.user;

import com.maoslv.pojo.Role;
import com.maoslv.pojo.User;

import java.util.List;
import java.util.Map;

public interface UserService {
    //注册用户
    int registerUser(User user);

    //查询用户名是否存在
    User queryUsername(String username);

    //通过用户名查询用户
    User getByUsername(String username);

    //通过用户Id获取用户权限
    String getUserAuthority(Integer id);

    List<User> getUserList(Map<String,Object> userMap);

    User getUserInfo(Integer id);

    int updateUser(Map<String,Object> userMap);

//    int delUser(Integer id);

    List<Role> getUserRole(Integer id);

    List<Role> getAllRole();

    List<Integer> getRoleId(Integer id);

    int assignRole(Integer id,List<Integer> list);

    User getUserById(Integer id);

    void sendEmail(String to, String subject, String content);
}
